namespace Infinity.Common.Patterns
{
	/// <summary>
	/// Standard singleton class
	/// </summary>
	public abstract class Singleton<T>
		where T : class, new()
	{
		private static T _Instance;

		/// <summary>
		/// Instance of singleton class
		/// </summary>
		public static T Instance
		{
			get
			{
				if (_Instance == null)
					_Instance = new T();
				return _Instance;
			}
		}
	}
}